package com.demo.core.orm.ibatis.sqlmap.type;

import java.sql.Blob;
import java.sql.SQLException;

import com.ibatis.sqlmap.client.extensions.ParameterSetter;
import com.ibatis.sqlmap.client.extensions.ResultGetter;
import com.ibatis.sqlmap.client.extensions.TypeHandlerCallback;

/**
 * BLOB (binary large object)，二进制大对象类型处理类
 * 
 * @author ryuu.kk
 *
 */
public class BlobTypeHandlerCallback implements TypeHandlerCallback {

	@Override
	public void setParameter(ParameterSetter setter, Object parameter)
			throws SQLException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Object getResult(ResultGetter getter) throws SQLException {
		Blob blob = (Blob) getter.getBlob();
		return getter.wasNull() ? null : blob;
	}

	@Override
	public Object valueOf(String s) {
		// TODO Auto-generated method stub
		return null;
	}

}
